
package tilefoneia;
import java.util.Date;
import java.text.DecimalFormat;

public class KinisiKlisis {
    
    private String hmerominia;
    private String ora_lepta;
    private int diarkeia;
    private double xreosiOmilias;
    
    public KinisiKlisis(String hmerominia, String ora_lepta, int diarkeia, double xreosiOmilias) {
        this.hmerominia = hmerominia;
        this.ora_lepta = ora_lepta;
        this.diarkeia = diarkeia;
        this.xreosiOmilias = xreosiOmilias;
    }
    
    public int getDiarkeia() {
        return diarkeia;
    }
    
    public String toString() {
        DecimalFormat df = new DecimalFormat("#.##");
        String str = (hmerominia + "   " + ora_lepta + " Διάρκεια: " + diarkeia 
                + "  Χρέωση: " + df.format(xreosiOmilias) + " €");
        return str;
    }
}
